package Main;

import java.net.InetAddress;
import java.net.UnknownHostException;

public class GetMyIp {
	public static String getMyIp(){
        try
        {
            InetAddress localaddr = InetAddress.getLocalHost();

            return localaddr.toString().split("/")[1];
        }
        catch (UnknownHostException e)
        {         
        }
        return null;
	}
	
	public static void main1(String[] args) {
		System.out.println(getMyIp());
	}
}
